<html ng-app="myApp"> <!-- 定义整个angulajs使用的上下文环境 -->
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>AngulaJs</title>
    <script type="text/javascript" src="angular/angular.js"></script>
</head>
<body>
<div ng-controller="myController">
    <h1>{{msg.echoInfo}}</h1>
</div>
<script type="text/javascript">
    var app = angular.module("myApp", []); // 定义模块
    app.controller("myController", function ($scope,$http) {
        $http({
            method :"post",
            url:"/EchoServlet",
            params : {
                "info" : "www.hanyx.cn"
            }
        }).success(function(data){
            $scope.msg = data ;
        });
    });
</script>
</body>
</html>
